# -*- coding: utf-8 -*-

import sys
import site
import os

vepath = 'C:\\VirtualEnvs\\ComCytEnv\\Lib\\site-packages'

prev_sys_path = list(sys.path)

# add the site-packages of our virtualenv as a site dir
site.addsitedir(vepath)

# reorder sys.path so new directories from the addsitedir show up first
new_sys_path = [p for p in sys.path if p not in prev_sys_path]
for item in new_sys_path:
    sys.path.remove(item)
sys.path[:0] = new_sys_path

# add the app's directory to the PYTHONPATH
pathApp = 'C:\\LED\\ComunidadCYT\\RepoComCYT'
if pathApp not in sys.path:
    sys.path.append(pathApp)

os.environ['DJANGO_SETTINGS_MODULE'] = 'comunidadcyt.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
